package cn.nyse.ktc_article.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "tb_column", schema = "ktc_article", catalog = "")
public class TbColumn {
    private String id;
    private String name;
    private String summary;
    private String userid;
    private Timestamp createtime;
    private Timestamp checktime;
    private String state;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "summary")
    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    @Basic
    @Column(name = "userid")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "createtime")
    public Timestamp getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Timestamp createtime) {
        this.createtime = createtime;
    }

    @Basic
    @Column(name = "checktime")
    public Timestamp getChecktime() {
        return checktime;
    }

    public void setChecktime(Timestamp checktime) {
        this.checktime = checktime;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbColumn tbColumn = (TbColumn) o;
        return Objects.equals(id, tbColumn.id) &&
                Objects.equals(name, tbColumn.name) &&
                Objects.equals(summary, tbColumn.summary) &&
                Objects.equals(userid, tbColumn.userid) &&
                Objects.equals(createtime, tbColumn.createtime) &&
                Objects.equals(checktime, tbColumn.checktime) &&
                Objects.equals(state, tbColumn.state);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, summary, userid, createtime, checktime, state);
    }
}
